home *** CD-ROM | disk | FTP | other *** search
- /*
- ** DPRun 1.0
- **
- ** ©2002 Peter Gordon
- **
- ** Please credit me if you use this source.
- **
- */
-
- MODULE 'intuition/intuition',
- 'intuition/screens'
-
- PROC main()
- DEF rstr[MAXPUBSCREENNAME]:STRING,rdargs,myargs:PTR TO LONG,od[MAXPUBSCREENNAME]:ARRAY OF CHAR
- myargs:=[0,0]
-
- /* Get args */
-
- IF(rdargs:=ReadArgs('PUBSCREEN/A,PROG/A/F',myargs,0))
-
- StringF(rstr,'Run <>NIL: "\s"',myargs[1])
-
- /* Get current default pubscreen */
- GetDefaultPubScreen(od)
-
- /* Set it to the user specified screen */
- SetDefaultPubScreen(myargs[0])
-
- /* Run the program */
- Execute(rstr,0,0)
-
- /* Give the program a chance to run */
- Delay(50)
-
- /* Reset the default pubscreen */
- SetDefaultPubScreen(od)
-
- FreeArgs(rdargs)
- ENDIF
- ENDPROC
-